// 待办事项
define('noticeServers', ['angular','jquery'], function (angular,$) {
    var module = angular.module('servers');
    module.factory('noticeServers', ['$http','Urlconfig',function($http,Urlconfig) { 
        return {
	        noticeList: function(info) {
	            return $http({
                    method  : 'POST',
                    url: 'http://'+Urlconfig.apiUrl+':8888/api/notice/list',
                    data:$.param(info),
                    headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
                });
	        },
            addNotice:function(info){
                return $http({
                    method  : 'POST',
                    url: 'http://'+Urlconfig.apiUrl+':8888/api/notice/add',
                    data:$.param(info),
                    headers : { 'Content-Type':'application/x-www-form-urlencoded' }
                });
            },
            editNotice:function(info){
                return $http({
                    method  : 'PUT',
                    url: 'http://'+Urlconfig.apiUrl+':8888/api/notice/edit',
                    data:$.param(info),
                    headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
                });
            },
            delNotice:function(info){
                return $http({
                    method  : 'DELETE',
                    url: 'http://'+Urlconfig.apiUrl+':8888/api/notice/del',
                    data:$.param({id:info.id}),
                    headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
                });
            }
	    };
    }]);
});